home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 011 / cprint.arc / JZFNDNXT.C < prev   
Encoding:
Text File  |  1986-01-15  |  1.3 KB  |  30 lines

  1. /*
  2. ┌────────────────────────────────────────────────────────────────────────────┐
  3. │ Title   : jzfndnxt                                                         │
  4. │ Purpose : find the next matching file from the disk transfer area specified│
  5. │           in a previous call to jzfndfst                                   │
  6. │ Parms                                                                      │
  7. │   fdta - directory record defined in jzdirect.h                            │
  8. │                                                                            │
  9. │  i.e.        error = jzfndnxt(&dir_record);                                │
  10. │       Written by Jack Zucker - 75766,1336    301-794-5950  on 1/15/85      │                                                               │
  11. └────────────────────────────────────────────────────────────────────────────┘
  12. */
  13.  
  14. jzfndnxt(fdta)
  15. int fdta;
  16.  
  17. {
  18.   union REGS winreg,woutreg;
  19.  
  20.   winreg.x.dx  = fdta;            /* get address of dir record */
  21.   winreg.h.ah  = 0x1a;            /* set dta function */
  22.   intdos(&winreg,&woutreg);
  23.  
  24.   winreg.h.ah = 0x4f;             /* find next function */
  25.   intdos(&winreg,&woutreg);
  26.   if (woutreg.x.cflag & 0x0001 == 1) return(woutreg.x.ax);
  27.   else return(0);        /* return 0 if no error, otherwise dos error code */
  28.  
  29. }
  30.